<!DOCTYPE html>
<html>
<head>
    <!--[if lt IE 7]>
    <div class="ie6_error">还在用<strong>漏洞百出的IE6浏览器</strong>么？为了您的网络安全，请升级浏览器 <a target="_blank"
                                                                               href="http://browsehappy.com">立即升级</a>
    </div>
    <![endif]-->

    <meta charset="utf-8">
    <title>订单管理-普通订单-文具1号</title>
    <meta name="description"
          content="文具1号作为上海办公用品供货商公司,专为世界500强企业及SOHO办公族提供网上商城一站式办公耗材批发及采购服务,一站式选购办公日用文具用品,厂家直销,好货又便宜【阳光采购就上文具1号 阳光价格 老板放心 品质保障 员工省力】"/>
    <meta name="keywords" content="办公用品,办公文具,办公文具网站,文具网站,办公用品网,文具采购网,金万年"/>
    <meta name="copyright" content="上海易推信息科技有限公司"/>
    <meta name="renderer" content="webkit">
    <base href="<?php echo base_url(); ?>"/>
    <link rel="shortcut icon" href="favicon.ico"/>
    <link rel="stylesheet" type="text/css" href="public/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/index.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/list_bought.css"/>
    <link rel="stylesheet" type="text/css" href="public/css/order-manage.css"/>
    <!--[if lte IE 9]>
    <script type="text/javascript" src="public/js/html5shiv-printshiv-3.js"></script>
    <![endif]-->
</head>
<body>
<div class="bg">
    <!--common - head -->
    <?php $this->load->view('common/header.php'); ?>
    <!--common - head end-->

    <div class="container mt20">
        <div class="order-manage-container">
            <p class="path-tit">
                <em class="color-red">订单管理</em>＞普通订单
            </p>
            <div class="order-manage-cont">
                <div id="main-content">

                    <div class="bought-list">
                        <form class="skin-gray clearfix bought-search" action="bBOrder.html" method="post">
                            <!--bought-search-more -->
                            <input type="hidden" name="ordertype" value="0">
                            <input type="hidden" id="visibility" name="visibility" value="0">
                            <input type="hidden" id="page" name="page" value="1">
                            <input type="hidden" name="auctionStatus" value="ALL">
                            <div class="remide-box" gdata-spm="7">
                                <h3>我的交易提醒：</h3>
                                <ul>
                                    <li><a href="<?php echo base_url();?>order/index?p=<?= $p ?>&id=4&good_name=<?= $good_name ?>"
                                           <?php if ($id == 4): ?>class="select"<?php endif; ?>>待付款<span
                                                    class="num">(0)</span></a></li>
                                    <li><a href="<?php echo base_url();?>order/index?p=<?= $p ?>&id=3&good_name=<?= $good_name ?>"
                                           <?php if ($id == 3): ?>class="select"<?php endif; ?>>待确认收货<span class="num">(0)</span></a>
                                    </li>
                                    <li><a href="<?php echo base_url();?>order/index?p=<?= $p ?>&id=5&good_name=<?= $good_name ?>"
                                           <?php if ($id == 5): ?>class="select"<?php endif; ?>>待评价<span
                                                    class="num">(0)</span></a></li>
                                </ul>
                                <button class="J_MakePoint button search-btn" type="button" id="searchBtn">
                                    搜索
                                </button>
                                <input type="text" size="50" id="J_BaobeiName" name="auctionTitle"
                                       value="<?= $good_name ?>"
                                       placeholder="在当前条件下搜索商品名称" maxlength="30">

                            </div>
                            <ul id="J_MoreControl" class="search-filter" style="display:none;">
                                <li class="col1">
                                    <label>成交时间:</label>&nbsp;&nbsp;
                                    从 <input type="text" size="13" id="bizOrderDateBegin" name="bizOrderDateBegin"
                                             value=""
                                             readonly="readonly"
                                             onfocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd',maxDate:'#F{$dp.$D(\'bizOrderDateEnd\')}'})"
                                             class="Wdate">
                                    到 <input type="text" size="13" id="bizOrderDateEnd" name="bizOrderDateEnd" value=""
                                             readonly="readonly"
                                             onfocus="WdatePicker({startDate:'%y-%M-%d 00:00:00',dateFmt:'yyyy-MM-dd',minDate:'#F{$dp.$D(\'bizOrderDateBegin\')}'})"
                                             class="Wdate">
                                </li>
                                <li class="col2">
                                    <label for="J_NickName"> 卖家昵称：</label>&nbsp;&nbsp;<input type="text"
                                                                                             name="sellerNick" size="15"
                                                                                             id="J_NickName" value="">
                                </li>
                                <li class="col3">
                                    <label for="J_ReviewStatus">评价状态：</label>
                                    <select id="J_ReviewStatus" class="J_NiceSelect" name="commentStatus">
                                        <option value="ALL">全部</option>
                                        <option value="I_HAS_NOT_COMMENT">需我评价</option>
                                        <option value="I_HAS_COMMENT">我已评价</option>
                                        <option value="OTHER_HAS_COMMENT">对方已评</option>
                                        <option value="ALL_COMMENT">双方已评</option>
                                    </select>
                                </li>
                                <li class="col1 ">
                                    <label for="J_TradeStatus">交易状态：</label>
                                    <select id="J_TradeStatus">
                                        <option value="ALL">全部</option>
                                        <option value="NOT_PAID">等待买家付款</option>
                                        <option value="PAID">买家已付款</option>
                                        <option value="SEND">卖家已发货</option>
                                        <option value="SUCCESS">交易成功</option>
                                        <option value="DROP">交易关闭</option>
                                        <option value="REFUNDING">退款中的订单</option>
                                    </select>
                                </li>
                                <li class="col2">
                                    <label for="J_AfterServiceStatus">售后服务：</label>
                                    <select name="tradeDissension" class="J_NiceSelect" id="J_AfterServiceStatus">
                                        <option value="ALL">全部</option>
                                        <option value="ACCUSED">已投诉</option>
                                        <option value="REFUNDING">退款中</option>
                                    </select>
                                </li>
                                <li class="col2">
                                    <label for="J_AfterServiceStatus">月结申请：</label>
                                    <select name="monthly_payment" class="J_NiceSelect" id="monthly_payment">
                                        <option value="">全部</option>
                                        <option value="1">未还款</option>
                                        <option value="2">已还款</option>
                                    </select>
                                </li>
                            </ul>
                        </form>
                        <form name="combinPay" gdata-mergeurl="bBPayment-mergeOrders.html" method="post"
                              target="_blank">
                        </form>
                        <form action="" method="post" id="J_BoughtListForm">
                            <input id="J_Token" type="hidden" name="_tb_token_" value="gUF4t3NQyTm">
                            <div class="navfloat" style="position:relative">
                            </div>
                            <table class="bought-table" id="J_BoughtTable" gdata-spm="9">
                                <colgroup>
                                    <col class="selector">
                                    <col class="baobei">
                                    <col class="price">
                                    <col class="price">
                                    <col class="price">
                                    <col class="quantity">
                                    <col class="price">
                                    <col class="after-service">

                                    <col class="trade-status">
                                    <col class="operate">
                                    <col class="other">
                                </colgroup>
                                <thead id="list-table-th" class="list-table-th">
                                <tr class="col-name">
                                    <th></th>
                                    <th class="baobei">商品</th>
                                    <th class="price">单价</th>
                                    <th class="quantity">数量</th>
                                    <th class="price">应付</th>
                                    <th class="price">优惠</th>
                                    <th class="quantity">实付</th>
                                    <th class="after-service">售后</th>

                                    <th class="trade-status">
                                        <div class="trade-status">
                                            <select class="trade-status-select" onchange="s_click(this)">
                                                <option value="" <?php if ($id == ""): ?>selected<?php endif; ?>>全部
                                                </option>
                                                <option value="1" <?php if ($id == 1): ?>selected<?php endif; ?>>
                                                    等待买家付款
                                                </option>
                                                <option value="2" <?php if ($id == 2): ?>selected<?php endif; ?>>买家已付款
                                                </option>
                                                <option value="3" <?php if ($id == 3): ?>selected<?php endif; ?>>卖家已发货
                                                </option>
                                                <option value="5" <?php if ($id == 4): ?>selected<?php endif; ?>>待付款
                                                </option>
                                                <option value="5" <?php if ($id == 5): ?>selected<?php endif; ?>>交易成功
                                                </option>
                                                <option value="0" <?php if ($id == "0"): ?>selected<?php endif; ?>>
                                                    交易关闭
                                                </option>
                                                <option value="6" <?php if ($id == 6): ?>selected<?php endif; ?>>
                                                    退款中的订单
                                                </option>
                                            </select>
                                        </div>
                                    </th>
                                    <th class="remark">交易操作</th>
                                    <th class="other">其它操作</th>
                                </tr>
                                <tr class="toolbar skin-gray">
                                    <td colspan="9">
                                        <label><input type="checkbox" class="all-selector" id="J_AllSelector">全选</label>
                                        <a href="javascript:void(0);" class="J_MakePoint toolbtn" gdata-point-url=""
                                           id="J_CombinPay">合并付款</a>
                                        <a href="###" class="J_MakePoint toolbtn long-toolbtn" gdata-point-url=""
                                           id="J_BatchReceive">批量确认收货</a>
                                        <span id="J_xCardTip" style="display: none;"></span>
                                    </td>

                                    <td class="last-col" colspan="2">
                                        <div class="paginator-top">

                                            <div class="paginator-next paginator-prev g-u preurl">上一页<span
                                                        class="paginator-arrow paginator-arrow-right-grey"></span></div>
                                            <div class="paginator-next g-u nexturl">下一页<span
                                                        class="paginator-arrow paginator-arrow-right-grey"></span></div>
                                        </div>
                                    </td>
                                </tr>
                                </thead>

                                <tbody gdata-isarchive="false" gdata-orderid="6646" gdata-status="WAIT_BUYER_PAY"
                                       class="xcard">
                                <?php foreach ($list as $vo): ?>
                                <tr class="order-hd">
                                    <td colspan="9">
                                        <span class="no">
                                            <label>
                                                <input type="checkbox" class="J_Selector selector" id="" name="order_id"
                                                       value="<?= $vo['id'] ?>"
                                                       gdata-mergetype="none">
                                                <span class="g-u"> </span>

                                                订单编号：<span class="order-num"><?= $vo['order_bn'] ?></span>
                                            </label>
                                        </span>
                                        <span class="deal-time">成交时间：<?= $vo['complated_at'] ?></span>
                                        <span class="seller">
                                            <a target="_blank" class="nickname J_MakePoint" title="文具1号超市"
                                               href="<?php echo base_url('office'); ?>">文具1号超市</a>
                                        </span>
                                    </td>
                                    <td colspan="2"></td>
                                </tr>
                                    <?php foreach ($vo['detail']['products'] as $key => $bo): ?>
                                        <tr id="" class="order-bd last" data-gid="10518" data-gcount="1">
                                            <td class="baobei" colspan="2">
                                                <a target="_blank" hidefocus="true" title="查看商品详情" href="10518.html"
                                                   class="pic s50">
                                                    <img alt="查看商品详情" src="">
                                                </a>
                                                <div class="desc">
                                                    <a class="baobei-name" target="_blank" href="10518.html">
                                                        金万年台笔 柜台笔 水性电话笔 办公商务台笔 签字电话台笔 G-377
                                                    </a>
                                                    <div class="spec" title="">
                                                        <?php foreach ($bo['sku_info'] as $k => $v): ?>
                                                            <span><?= $k ?> : <?= $v ?>&nbsp;&nbsp;</span>
                                                        <?php endforeach; ?>
                                                    </div>
                                                </div>
                                            </td>
                                            <td class="price oprice" title="2.43"><?= $bo['price'] ?></td>
                                            <td class="quantity" title="1"><?= $bo['count'] ?></td>
                                            <td class="price" title="2.43"
                                                style="color:#36C;font-weight:800;"><?= $bo['price'] * $bo['count'] ?></td>
                                            <td class="price" title="0.00">0.00</td>
                                            <td class="quantity" title="2.43"
                                                style="color:#36C;font-weight:800;"><?= $bo['final_price'] ?></td>
                                            <td class="after-service">
                                                <a href="bBReport-post.html&amp;orderId=6646&amp;goodsId=10518&amp;orderSn=0010180208040018"
                                                   target="_blank">违规举报</a>
                                            </td>
                                            <?php if ($key == 0): ?>
                                                <td class="trade-status"
                                                    rowspan="<?= count($vo['detail']['products']) ?>">
                                        <span class="J_MakePoint status closed" target="_blank"
                                              href="bBOrder-detail.html&amp;orderId=6646">
                                            交易关闭
                                        </span>
                                                    <span>
                                            <a href="bBOrder-detail.html&amp;orderId=6646" target="_blank"
                                               class="detail-link J_MakePoint">订单详情</a>
                                        </span>
                                                    <span class="fg" style="background: none;">
                                         <a href="javascript:void(0);" style="color: rgb(153, 153, 153);">再次购买</a>
                                        </span>
                                                </td>
                                                <td class="operate" rowspan="<?= count($vo['detail']['products']) ?>">
                                                    <?php if ($vo['status'] == 0): ?>
                                                        关闭交易
                                                    <?php elseif ($vo['status'] == 1): ?>
                                                        交易成功
                                                    <?php elseif ($vo['status'] == 2): ?>
                                                        买家已付款
                                                    <?php elseif ($vo['status'] == 3): ?>
                                                        卖家已发货
                                                    <?php elseif ($vo['status'] == 4): ?>
                                                        等待买家付款
                                                    <?php elseif ($vo['status'] == 5): ?>
                                                        交易结束
                                                    <?php elseif ($vo['status'] == 6): ?>
                                                        退货中
                                                    <?php elseif ($vo['status'] == 7): ?>
                                                        已退货
                                                    <?php endif; ?>
                                                </td>
                                                <td class="other" rowspan="<?= count($vo['detail']['products']) ?>">
                                                    <a class="J_DelOrder J_MakePoint" gdata-orderid="6646"
                                                       href="javascript:void(0);">删除</a>
                                                </td>
                                            <?php endif; ?>
                                        </tr>
                                    <?php endforeach; ?>


                                <tr>
                                    <td colspan="11" style="text-align: right;">
                                        <span>商品金额：<?= $vo['detail']['money'] ?></span>
                                        <span>优惠：0.00</span>
                                        <span>
                                        <strong
                                                style="color:#C00;font-family: Tahoma,Helvetica,Arial,\5b8b\4f53;font-weight:800;">实付金额：<?= $vo['money'] ?></strong>

                                        <span class="post-type">
                                        (含快递:<?= $vo['express_fee'] ?> )
                                        </span>
                                    </span>
                                    </td>
                                </tr>
                                <?php endforeach; ?>
                                </tbody>

                                <tfoot>
                                <tr class="sep-row">
                                    <td colspan="9"></td>
                                </tr>
                                <tr class="toolbar skin-gray">
                                    <td colspan="3">
                                        <label><input type="checkbox" class="all-selector"
                                                      id="J_AllSelector2">全选</label>
                                        <a id="J_CombinPay2" href="javascript:void(0)" class="J_MakePoint toolbtn"
                                           gdata-point-url="">合并付款</a>

                                        <a id="J_BatchReceive2" href="javascript:void(0)"
                                           class="J_MakePoint toolbtn long-toolbtn"
                                           gdata-point-url="">批量确认收货</a>
                                    </td>


                                    <td class="page-nav-cell" colspan="8">
                                        <ul class="page-nav">
                                            <li class="curr-page">
                                                <a class="selected" gdata-page="1"
                                                   href="javascript:void(0);"><?= $p ?></a>
                                            </li>
                                            <li>
                                                <span>共<?= $num ?>页 &nbsp;</span>
                                                <span>到第&nbsp;<?= $p ?></span>
                                                <input id="J_PageNum" type="text" name="pageNum" value="<?= $p ?>"
                                                       size="2"
                                                       maxlengh="4"
                                                       style="float:left; height:20px;">
                                                <span>&nbsp;页&nbsp;</span>

                                                <input id="J_JumpTo" type="button" value="确定" gdata-totalpage="1"
                                                       class="J_MakePoint"
                                                       style="float:left; height:22px; line-height:16px;">
                                            </li>
                                        </ul>
                                    </td>
                                </tr>
                                </tfoot>
                            </table>
                        </form>
                    </div>
                    <!--end bought-list-->
                </div>

            </div>
        </div>
    </div>
    <?php $this->load->view('common/bottom.php'); ?>
</div>

<script type="text/javascript" src="public/js/jquery.min.js"></script>
<script type="text/javascript" src="public/js/index.js"></script>
<script type="text/javascript" src="public/js/owl.carousel.min.js"></script>

<script type="text/javascript">
    $(function () {
        $(".workbench-edit-btn-change").click(function () {
            $(this).parent().hide();
            $(".company-type2").show();
        });
        $(".workbench-edit-btn-submit").click(function () {
            var companyName = $(".company-name-input").val();
            console.log(companyName);
            if (!companyName) {
                alert("请输入公司全称");
                return false
            } else {
                $(this).parent().hide();
                $(".company-type1").show();
                $('.company-name').html(companyName)
            }

        });

        $('#J_AllSelector,#J_AllSelector2').click(function () {
            var _this = $(this);
            if (this.checked) {
                $('#J_AllSelector,#J_AllSelector2').prop("checked", true);
                $('input[name="order_id"]').each(function () {
                    //此处如果用attr，会出现第三次失效的情况
                    $(this).prop("checked", true);
                });
            } else {
                $('#J_AllSelector,#J_AllSelector2').prop("checked", false);
                $('input[name="order_id"]').each(function () {
                    $(this).removeAttr("checked", false);
                });
                //$(this).removeAttr("checked");
            }
        })

        $('#searchBtn').click(function () {
            var p = "<?=$p?>";
            var id = "<?=$id?>";
            var good_name = $('#J_BaobeiName').val();
            location.href = '<?php echo base_url();?>order/index?p=' + p + '&id=' + id + '&good_name=' + good_name;
        })

        $('.preurl').click(function () {
            var preurl = "<?=$preurl?>"
            location.href = preurl;
        })

        $('.nexturl').click(function () {
            var nexturl = "<?=$nexturl?>"
            location.href = nexturl;
        })

        $('#J_JumpTo').click(function () {
            var good_name = "<?=$good_name?>";
            var id = "<?=$id?>";
            var p = $('#J_PageNum').val();
            location.href = '<?php echo base_url();?>order/index?p=' + p + '&id=' + id + '&good_name=' + good_name;
        })
    });

    function s_click(obj) {
        var num = 0;
        for (var i = 0; i < obj.options.length; i++) {
            if (obj.options[i].selected == true) {
                num++;
            }
        }

        if (num == 1) {
            var url = obj.options[obj.selectedIndex].value;
            var p = "<?=$p?>";
            var good_name = "<?=$good_name?>";
            if (url == '') {
                location.href = '<?php echo base_url();?>order/index?p=' + p + '&id=' + url + '&good_name=' + good_name;
            } else {
                location.href = '<?php echo base_url();?>order/index?p=' + p + '&id=' + url + '&good_name=' + good_name;

            }

        }
    }
</script>

</body>
</html>